<div class="row">
	<div class="col-lg-12">
		<h1 class="site-h1" style="background-color:#FFFFFF;">
			升级规则列表<#if gradeList??>（${gradeList.totalElements!''}）</#if>
			<span style="float:right;">
				<button class="layui-btn layui-btn-small green" href="/admin/grade/add.html" data-toggle="ajax"  data-href-index="/admin/grade/index" data-width="80%" data-height="95%" data-title="新建数据字典">
					新建升级规则
				</button>
			</span>
		</h1>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12">
				<table class="layui-table" lay-skin="line" id="example-basic">
				  <thead>
					<tr>
					  <th>等级</th>
					  <th>积分分组</th>
					  <th>分数区间</th>
					  <th>勋章</th>
					  <th style="white-space:nowrap;" nowrap="nowrap">操作</th>
					</tr> 
				  </thead>
				  <tbody>
					<#if gradeList?? && gradeList??>
					<#list gradeList.content as grade>
					<tr>
					  <td class="add">${grade.grade!''}</td>
					  <td>${grade.groups!''}</td>
					  <td>${grade.minimum!''}-${grade.maximum!''}</td>
					  <td><img id="showInfor" alt="" src="/res/gradeFile/${grade.fileurl!''}.html"  style="width:30px" ></td>
					  <td style="white-space:nowrap;" nowrap="nowrap">		
					  		<a href="/admin/grade/edit.html?id=${grade.id!''}" data-toggle="ajax" data-href-index="/admin/grade/index" data-width="80%" data-height="95%" data-title="编辑信息">
					  			<i class="layui-icon">&#xe642;</i>
					  			编辑
					  		</a>
					  		<a href="/admin/grade/delete.html?id=${grade.id!''}" style="margin-left:10px;" data-toggle="tip" data-title="请确认是否删除记录？">
					  			<i class="layui-icon" style="color:red;">&#x1006;</i>
					  			删除
					  		</a>
					  </td>
					</tr>
					</#list>
					</#if>
				  </tbody>
				</table>
			</div> 	   
		</div>
		<div class="row" style="padding:5px;">
			<div class="col-lg-12" id="page" style="text-align:center;"></div>
		</div>
	</div>	
</div>
<script>
var list= [];
<#list gradeList.content as list>
	list.push({"id":"${list.id!''}"});
</#list>
console.log(list);
	layui.use(['laypage', 'layer'], function(){
	  var laypage = layui.laypage
	  ,layer = layui.layer;
	  laypage({
			cont: 'page'
			,pages: <#if gradeList??>${gradeList.totalPages}<#else>0</#if> //总页数
			,curr:<#if gradeList??>${gradeList.number+1}<#else>0</#if>
			,groups: 5 //连续显示分页数
			,jump:function(data , first){
				if(!first){
					location.href = "/admin/grade/list.html?p="+data.curr ;
				}
			}
	   });
	  
	});
</script>